
import 'package:flutter/material.dart';

/// 创建一个无状态组件
/// author: guohuaikun
class Echo extends StatelessWidget {

  final Color backgroundColor;
  final String text;

  const Echo({Key key, this.backgroundColor,@required this.text}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Container(
        color: backgroundColor,
        child: Text(
          text
        ),
      ),
    );
  }
}
